//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package cn.wolfcode.rbac.domain;

import cn.wolfcode.rbac.domain.SystemDictionaryItem;
import com.alibaba.fastjson.JSON;

import java.util.Date;
import java.util.HashMap;

public class Customer {
    public static final int STATUS_COMMON = 0;
    public static final int STATUS_NORMAL = 1;
    public static final int STATUS_FAIL = 2;
    public static final int STATUS_LOST = 3;
    public static final int STATUS_POOL = 4;
    private Long id;
    private String name;
    private Integer age;
    private Integer gender;
    private String tel;
    private String qq;
    private SystemDictionaryItem job;
    private SystemDictionaryItem source;
    private Employee seller;
    private Employee inputuser;
    private Date inputTime;
    private Integer status = Integer.valueOf(0);

    public Customer() {
    }

    public String getJson() {
        HashMap map = new HashMap();
        map.put("id", this.id);
        map.put("name", this.name);
        map.put("age", this.age);
        map.put("gender", this.gender);
        map.put("tel", this.tel);
        map.put("qq", this.qq);
        if (this.job != null) {
            map.put("jobId", this.job.getId());
        }

        if (this.source != null) {
            map.put("sourceId", this.source.getId());
        }

        if (this.seller != null) {
            map.put("sellerId", this.seller.getId());
            map.put("sellerName", this.seller.getName());
        }

        return JSON.toJSONString(map);
    }

    public String getStatusName() {
        String temp = "潜在客户";
        switch(this.status.intValue()) {
            case 1:
                temp = "正式客户";
                break;
            case 2:
                temp = "开发失败客户";
                break;
            case 3:
                temp = "流失客户";
                break;
            case 4:
                temp = "客户池";
        }

        return temp;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public void setJob(SystemDictionaryItem job) {
        this.job = job;
    }

    public void setSource(SystemDictionaryItem source) {
        this.source = source;
    }

    public void setSeller(Employee seller) {
        this.seller = seller;
    }

    public void setInputuser(Employee inputuser) {
        this.inputuser = inputuser;
    }

    public void setInputTime(Date inputTime) {
        this.inputTime = inputTime;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getId() {
        return this.id;
    }

    public String getName() {
        return this.name;
    }

    public Integer getAge() {
        return this.age;
    }

    public Integer getGender() {
        return this.gender;
    }

    public String getTel() {
        return this.tel;
    }

    public String getQq() {
        return this.qq;
    }

    public SystemDictionaryItem getJob() {
        return this.job;
    }

    public SystemDictionaryItem getSource() {
        return this.source;
    }

    public Employee getSeller() {
        return this.seller;
    }

    public Employee getInputuser() {
        return this.inputuser;
    }

    public Date getInputTime() {
        return this.inputTime;
    }

    public Integer getStatus() {
        return this.status;
    }
}
